﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;

namespace DARE
{
    public abstract class ARenderable : IUpdateable, IDrawable
    {

    #region abstract

        public abstract void Update(GameTime gameTime);
        public abstract void Draw(GameTime gameTime);

    #endregion

    #region fields

        protected string m_name;
        protected CNode m_node;
        protected CEntity m_entity;
        protected bool m_updatable = true;
        protected bool m_drawable = true;

    #endregion

    #region methods

        public virtual string Name
        {
            get { return m_name; }
            set { }
        }

        // crash if the user change the node with set, disallow with internal
        public virtual CNode Node
        {
            get { return m_node; }
            internal set { m_node = value; }
        }

        // crash if the user change the entity with set, disallow with internal
        public virtual CEntity Entity
        {
            get { return m_entity; }
            internal set { m_entity = value; }
        }

        public bool Updatable
        {
            get { return m_updatable; }
            set { m_updatable = value; }
        }

        public bool Drawable
        {
            get { return m_drawable; }
            set { m_drawable = value; }
        }

    #endregion

    }
}
